<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>登录</title>
	<link rel="stylesheet" href="./css/login.css">
</head>

<body>
    <div class="background">
        <div class="loginCard">
            <div class="top">
                <div class="head">

                </div>
            </div>

            <div class="form">
                    <form method="post" name="loginForm">
                            <span class="tip">账号</span> 
                            <input type="text" placeholder="请输入账号" class="icon-account" name="userName">
                            <span class="tip">密码</span>
                            <input type="password" placeholder="请输入密码" class="icon-password" name="psd">                                         
                            <input type="submit" onclick="loginBtn()" class="launch register" value="注册" name="register">
                            <input type="submit" onclick="registerBtn()" class="launch login" value="登录" name="login">
                    </form>
                </div>

            </div>
        </div>
</body>
<script type="text/javascript">
	function loginBtn() {
		loginForm.action = "register.jsp";
	}
	
	function registerBtn() {
		if(loginForm.userName.value == ""){
			alert("用户名不能为空");
			regForm.userName.focus();
		}else if(loginForm.psd.value == ""){
			alert("密码不能为空");
			regForm.psd.focus();
		}else{
			loginForm.action = "loginSuccess.jsp";
		}

	}
	window.onload = function(){
		alert("老师您好！为了更好展示并使用本系统，请一定一定将地址复制到谷歌浏览器中查看！如果已经在谷歌浏览器中，请忽略。");
	}
	
</script>
</html>